/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:48 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Khoahoc_BaihocEntity
    {
        public Khoahoc_BaihocEntity()
        {
			m_pk_ikhoahoc_baihocid=0;
			m_fk_ikhoahocid=0;
			m_fk_ibaihocid=0;
            m_isothutu = 0;
			m_sghichu="";
        }
		private Int64 m_pk_ikhoahoc_baihocid;
		public Int64 PK_iKhoahoc_BaihocID
		{
			get { return m_pk_ikhoahoc_baihocid ; }
			set { m_pk_ikhoahoc_baihocid = value; }
		}
		private Int64 m_fk_ikhoahocid;
		public Int64 FK_iKhoahocID
		{
			get { return m_fk_ikhoahocid ; }
			set { m_fk_ikhoahocid = value; }
		}
		private Int64 m_fk_ibaihocid;
		public Int64 FK_iBaihocID
		{
			get { return m_fk_ibaihocid ; }
			set { m_fk_ibaihocid = value; }
		}
        private int m_isothutu;
        public int iSothutu
        {
            get { return m_isothutu; }
            set { m_isothutu = value; }
        }

		private String m_sghichu;
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}

        #region Comparison
        public static List<Khoahoc_BaihocEntity> Sort(List<Khoahoc_BaihocEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Khoahoc_BaihocEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Khoahoc_BaihocEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Khoahoc_BaihocEntity> COMPARISON_PK_iKhoahoc_BaihocID
		{
			get
			{
				return delegate(Khoahoc_BaihocEntity entity,Khoahoc_BaihocEntity other)
				{
					return entity.PK_iKhoahoc_BaihocID.CompareTo(other.PK_iKhoahoc_BaihocID);
				};
			}
		}
		public static Comparison<Khoahoc_BaihocEntity> COMPARISON_FK_iKhoahocID
		{
			get
			{
				return delegate(Khoahoc_BaihocEntity entity,Khoahoc_BaihocEntity other)
				{
					return entity.FK_iKhoahocID.CompareTo(other.FK_iKhoahocID);
				};
			}
		}
		public static Comparison<Khoahoc_BaihocEntity> COMPARISON_FK_iBaihocID
		{
			get
			{
				return delegate(Khoahoc_BaihocEntity entity,Khoahoc_BaihocEntity other)
				{
					return entity.FK_iBaihocID.CompareTo(other.FK_iBaihocID);
				};
			}
		}
		public static Comparison<Khoahoc_BaihocEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(Khoahoc_BaihocEntity entity,Khoahoc_BaihocEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
        #endregion
    }
}
